<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>行高line-height</title>
    <style>
        * {
            margin: 0;
            padding: 0;
        }

        p {
            /* height = line-hieght 文字垂直居中 */
            height: 100px;
            line-height:100px;
            background-color: gold;
        }
    </style>
</head>

<body>

    <p>珠峰培训珠峰培训珠峰培训珠峰培训</p>

</body>

</html>